{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# JSON\n",
    "- www.w3school.com.cn/json\n",
    "- JSON(JavaScriptObjectNotation)\n",
    "- 轻量级的数据交换格式，基于ECMAScript\n",
    "- json格式是一个键值对形式的数据集\n",
    "    - key： 字符串\n",
    "    - value：字符串，数字，列表，json\n",
    "    - json使用大括号包裹\n",
    "    - 键值对直接用逗号隔开\n",
    "            student = {\n",
    "                'name' : 'cheng',\n",
    "                'age' : 28,\n",
    "                'mobile' : '12432',\n",
    "                }\n",
    "    - json 和python格式的对应\n",
    "        - 字符串：字符串\n",
    "        - 数字：数字\n",
    "        - 队列：list\n",
    "        - 对象：dict\n",
    "        - 布尔值：布尔值\n",
    "    - python for json\n",
    "        - json包\n",
    "        - json和python对象的转换\n",
    "            - json.dumps()：对数据编码，把python格式表示成json格式\n",
    "            - json.loads()：对数据解码，把json格式转换成python格式\n",
    "            \n",
    "        - python读取json文件\n",
    "            - json.dump():把内容写入文件\n",
    "            - json.load()：把json文件内容读入python\n",
    "            \n",
    "            "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
